package com.example.consumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.demo2.TestService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author:ChenSheng
 * @Description:
 * @Date: Created in 下午 20:32 2018/6/10 0010
 */
@Controller
public class IndexController {

    @Reference(version = "1.0.0")
    TestService testService;

    @RequestMapping("/index")
    @ResponseBody
    public String consume(){
        return testService.sayHello();
    }

}
